# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.

import random
ran = random.randint(1,50)
#count = 0
print('猜数字')
while True:
    guess = int(input('请输入数字：'))
#    count = count + 1
    if guess == ran:
        print('猜对了')
        break
    elif guess > ran:
        print('大了')
    else:
        print('小了')
print(' 本轮辛运数字：%d'% ran)


# See PyCharm help at https://www.jetbrains.com/help/pycharm/
